<div class="modal-header">
    <h3 class="modal-title">资源选择</h3>
</div>
<div class="modal-body resource-content">
    <form class="form-horizontal form-content" name="resource_Form">
        <div class="form-group">
            <div class="row resource-title">
                <label class="title">路径：</label>
                <ul class="resource-path">
                    <li ng-click="rootPath()">根目录/</li>
                    <li ng-click="switchPath($index)" ng-repeat="path in currentPaths">{{path}}/</li>
                </ul>
            </div>
            <div class="row resource-explorer">
                <div class="resource-left">
                    <span ng-click="createFolder($event)" class="resource-create-folder">
                        <i class="fa fa-plus-square"></i>
                        新建文件夹
                    </span>
                    <ul class="resource-folder">
                        <li ng-repeat="folder in currentChildFolders" ng-click="folderSelected(folder)"><i
                                class="glyphicon glyphicon-folder-close"></i><span>{{folder}}</span><i
                                ng-click="removeFolder(folder,$event)" class="fa fa-trash-o"></i><i
                                ng-click="editFolder(folder,$event)" class="fa fa-pencil-square-o"></i></li>
                    </ul>
                </div>
                <div class="resource-right">
                    <ul class="resource-file">
                        <li ng-repeat="file in currentChildFiles" ng-class="{'resource-selected-file':file==selectItem}"
                            ng-click="fileSelected(file)"><img ng-src="{{getImageUrl(file)}}" title="{{file}}"/><span>{{file}}</span><i
                                ng-click="removeFile(file,$event)" class="fa fa-trash-o"></i></li>
                    </ul>
                </div>
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-6 resource-upload-files">
                <ul>
                    <li ng-repeat="item in uploader.queue">
                        名称: <span ng-bind="item.file.name"></span>
                        <button ng-click="item.upload()">上传</button>
                        <button ng-click="item.remove()">移除</button>
                    </li>
                </ul>
            </div>
            <div class="col-xs-6 resource-upload-select">
                <div class="row">
                    <button type="button" class="btn btn-success btn-s" ng-click="uploader.uploadAll()"
                            ng-disabled="!uploader.getNotUploadedItems().length">
                        <span class="glyphicon glyphicon-upload"></span> 全部上传
                    </button>
                    <button type="button" class="btn btn-danger btn-s" ng-click="uploader.clearQueue()"
                            ng-disabled="!uploader.queue.length">
                        <span class="glyphicon glyphicon-trash"></span> 全部移除
                    </button>
                </div>
                <div class="row">
                    <div class="upload">
                        <input type="file" name="resource-upload" id="resource-upload" nv-file-select
                               uploader="uploader" multiple/>
                    </div>
                </div>
            </div>
        </div>
    </form>
    <div class="row resource-support-info">支持类型：{{supportsArray}}</div>
    <div class="row resource-selected-info">选中资源：{{selectItem}}</div>
</div>
<div class="modal-footer">
    <button class="btn btn-primary" type="button" ng-click="ok()">确认</button>
    <button class="btn btn-warning" type="button" ng-click="cancel()">取消</button>
</div>